﻿@{
    ViewBag.Title = "静态化测试";
}
<div class="row" style="margin-top:50px;">
    <div class="col-md-4">
        <hr />
        <div>
            @Ajax.ActionLink("使用HTML模板生成静态页面", "UseHtmlTemplateStatic", "Home", null, new AjaxOptions() { HttpMethod = "POST", OnSuccess = "OnSuccess" }, new { @class = "btn btn-primary btn-lg" })
        </div>
        <hr />
        <div>
            <a href="~/StaticTemplate/ArticleTemplate.html" target="_blank">点击浏览HTML模板页面</a>
        </div>
    </div>
    <div class="col-md-4">
        <hr />
        <div>
            @Ajax.ActionLink("使用视图引擎实现页面静态化", "UseViewEngineStatic", "Home", null, new AjaxOptions() { HttpMethod = "POST", OnSuccess = "OnSuccess" }, new { @class = "btn btn-primary btn-lg" })
        </div>
        <hr />
        <div>
            <a href="/Home/Article" target="_blank">点击浏览视图模板页面</a>
        </div>
    </div>
    <div class="col-md-4">
        <hr />
        <div>
            @Ajax.ActionLink("使用XML实现页面静态化", "UseXmlStatic", "Home", null, new AjaxOptions() { HttpMethod = "POST", OnSuccess = "OnSuccess" }, new { @class = "btn btn-primary btn-lg" })
        </div>
        <hr />
        <div>
            <a href="/Home/Article" target="_blank">点击浏览视图模板页面</a>
        </div>
    </div>
</div>
<div id="divMessage">
</div>
@section scripts{
    <script type="text/javascript">
        function OnSuccess(message) {
            var msg = "<div class=\"alert alert-info\" role=\"alert\">" + message + "</div>";
            $("#divMessage").prepend(msg);
        }
    </script>
}